package net.k3rnel.abugadro.gcodes.beans;

import net.k3rnel.abugadro.AbugadroContentProvider;
import android.net.Uri;
import android.provider.BaseColumns;

public class CommentUpdate {

	public CommentUpdate() {
	}

	public static final class CommentUpdates implements BaseColumns {
		private CommentUpdates() {
		}

		public static final Uri CONTENT_URI = Uri.parse("content://"+ AbugadroContentProvider.AUTHORITY + "/gcode/*/issues/*/comments/*/commentupdates");
		

		public static final String CONTENT_TYPE_DIR = "vnd.android.cursor.dir/vnd.abugadro.commentupdates";
		public static final String CONTENT_TYPE_ITEM = "vnd.android.cursor.item/vnd.abugadro.commentupdates";

		public static final String _ID = "_id";
		public static final String GCODE_ID = "gcode_id";
		public static final String ISSUE_ID = "issue_id";
		public static final String COMMENT_ID = "comment_id";
		public static final String CONTENT = "content";
		public static final String TYPE = "type";
		public static final String POSITIVE = "positive";
		
		public static final String DEFAULT_SORT = _ID + " ASC";
		
		/** Build {@link Uri} for requested {@link #_ID}. */
        public static Uri buildFullUri(String gcodeId, String issueId, String commentId) {
        	return Uri.parse("content://"+ AbugadroContentProvider.AUTHORITY + "/gcode/"+gcodeId+"/issues/"+issueId+"/comments/"+commentId+"/commentupdates/");
        }
        public static Uri buildUri(String commentId) {
            return CONTENT_URI.buildUpon().appendPath(commentId).build();
        }
	}

}